<template>
  <h3>props</h3>
  <PageChild :title="title" @update-title="updateTitle" />
</template>

<script setup lang="ts">
import { ref } from 'vue'
defineOptions({ name: 'PageParentProps' })
import PageChild from '@/components/PageChild.vue'
const title = ref('父组件传给子组件的标题')
const updateTitle = (tit: string) => {
  console.log('父组件更新子组件的title:', tit)
  title.value = tit
}
</script>
